The present invention relates to a frequency adjusting circuit in a code division multiple access (to be referred to as a CDMA hereinafter) communication system, which performs adjustment to make the frequency of cosine and sine waves to be used for demodulation match the carrier frequency of a received CDMA modulated wave.
CDMA communication systems are currently being standardized by the 3GPP (Third Generation Partnership Project) as a standardization project that examines the international standard of third generation mobile communication systems. The specifications of a physical channel of a CDMA communication system and the like are defined by the 3GPP.
In a CDMA communication system, generally, a transmission signal transmitted from the transmitting side is given by
Transmission signal=(Di+jDq)xc3x97(Ci+jCq)xe2x80x83xe2x80x83(1) 
Di: transmission data of in-phase component
Dq: transmission data of quadrature component
Ci: in-phase component spreading code
Cq: quadrature component spreading code
j: imaginary number
(+ represents exclusive OR (to be referred to as EXOR hereinafter))
An in-phase component spreading code Ci and quadrature component spreading code Cq are formed by multiplying a spreading code SP by a scramble code SCi of an in-phase component and a scramble code SCq of a quadrature component, respectively, and are given by
Ci=SP+SCixe2x80x83xe2x80x83(2) 
Cq=SP+SCqxe2x80x83xe2x80x83(3) 
(+ represents EXOR)
The transmission signal is received by the receiving section of a base station or terminal and demodulated by multiplying it by the complex conjugate of the spreading code, as indicated by
Transmission signalxc3x97(Cixe2x88x92jCq)=(Di+jDq)xc3x97(Ci+jCq)xc3x97(Cixe2x88x92jCq)=A(Di+jDq)xe2x80x83xe2x80x83(4) 
(A is a coefficient, and + represents EXOR)
In a CDMA communication system, normally, dedicated channels for initial synchronization are defined for spreading code identification. These channels are called synchronization channels (to be referred to as SCHs hereinafter). The SCHs include the first synchronization channel (P-SCH) and second synchronization channel (S-SCH). In the CDMA communication system, it is first necessary to acquire the SCH on the receiving side. In the 3GPP, a symbol Cpsc of the first synchronization channel is defined by
a= less than x1,x2,x3, . . . , x6 greater than = less than 1, 1, 1, 1, 1, 1, xe2x88x921, 1, xe2x88x921, 1, xe2x88x921, xe2x88x921, 1 greater than xe2x80x83xe2x80x83(5) 
Cpsc=(1+j)xc3x97 less than a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a greater than xe2x80x83xe2x80x83(6) 
In a CDMA communication system, the receiving side must adjust the frequency of cosine and sine waves to be used for demodulation such that the value of the frequency of the cosine and sine waves to be used for demodulation matches the value of the frequency of the carrier wave. Hence, a CDMA communication system generally has a frequency adjusting circuit for adjusting the frequency to be used for demodulation.
In a conventional frequency adjusting circuit, synchronization is established using a synchronization channel (to be referred to as an SCH hereinafter) and then the frequency to be used for demodulation is adjusted using a common pilot channel (to be referred to as a CPICH hereinafter). In the conventional frequency adjusting circuit, in receiving the CPICH, the value of the frequency of cosine and sine waves to be used for demodulation is switched to some appropriate frequency values to obtain reception results at corresponding times, and the value of the frequency of the most likely one of the reception results is determined as the value of the frequency of the cosine and sine waves to be used for demodulation.
The initial frequency error generated between the frequency of a carrier wave and that to be used for demodulation is closely related to the time until the first common control physical channel (to be referred to as a P-CCPCH hereinafter). For this reason, the frequency adjusting circuit preferably adjusts the frequency error to be used for demodulation. However, since the conventional frequency adjusting circuit selects the optimum frequency to be used for demodulation by trial and error, frequency adjustment is time-consuming.
In addition, the conventional frequency adjusting circuit detects the initial frequency error at the stage of CPICH. At the stage of SCH, the initial frequency error has not been eliminated yet. For this reason, even a place at which a radio wave from a base station arrives may be determined as an incommunicable zone at the stage of SCH due to the initial frequency error.
As described above, the conventional frequency adjusting circuit has the following two problems.
(1) Since the optimum frequency to be used for demodulation is selected by trial and error, frequency adjustment is time-consuming, and the time until P-CCPCH detection becomes long.
(2) Since the initial frequency error is detected at the stage of CPICH, the initial frequency error has not been eliminated yet at the stage of SCH. For this reason, even a place at which a radio wave from a base station arrives may be determined as an incommunicable zone due to the initial frequency error.
It is the first object of the present invention to provide a frequency adjusting circuit capable of quickly correcting an initial frequency error and shortening the time until P-CCPCH detection.
It is the second object of the present invention to provide a frequency adjusting circuit capable of correcting the error between the frequency of a carrier wave and the frequency of a sine wave for demodulation at the stage of SCH and preventing any incommunicable zone determination for a mobile station due to an initial frequency error in the range where radio waves can reach.
In order to achieve the above objects, according to the present invention, there is provided a frequency adjusting circuit comprising an oscillator for outputting cosine and sine waves, quadrature demodulation means for extracting and outputting a baseband signal of an in-phase component from a carrier wave input from an antenna using the cosine wave output from the oscillator and extracting and outputting a baseband signal of a quadrature component from the carrier wave using the sine wave output from the oscillator, a first A/D converter for converting the baseband signal of the in-phase component output from the quadrature demodulation means into a digital signal and outputting the digital signal, a second A/D converter for converting the baseband signal of the quadrature component output from the quadrature demodulation means into a digital signal and outputting the digital signal, a first despreader for despreading and outputting the signal output from the first A/D converter, a second despreader for despreading and outputting the signal output from the second A/D converter, frequency error detection means for detecting an error between a frequency of the carrier wave and a frequency of the cosine and sine waves output from the oscillator in accordance with a value of the signal output from the first despreader and a value of the signal output from the second despreader, and a reference oscillator for outputting a value of an oscillation frequency as the frequency of the cosine and sine waves to be output from the oscillator and changing a value of the oscillation frequency so as to cancel the frequency error detected by the frequency error detection means.